package com.v5ba.annotation.async.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author yiren
 * @since 2022/2/5
 */
@Service
public class AsyncService {
	@Async
	public void sayHello(){
		try {
			Thread.sleep(1000*1L);
			System.out.println("sayHello, thread-name:"+Thread.currentThread().getName());
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
